<template>
  <div>
    <CodeEditor v-model="YamlValues"
                mode="yaml" />
    <el-button type="primary"
               icon="el-icon-circle-check-outline"
               @click="saveData"
               round>
      点击保存
    </el-button>
    <el-button icon="el-icon-caret-right"
               type="info"
               @click="serviceRestart"
               round>
      重启服务
    </el-button>

  </div>

</template>

<script>
// import BaseCodemirror from '@/components/codemirror'
// import { ref } from 'vue'
// export default {
//   name: 'Demo',
//   components: {
//     BaseCodemirror
//   },
//   setup() {
//     const yamlRef = ref(null)
//     const code = ref(`apiVersion: apps/v1
// kind: DaemonSet
// metadata:
//   annotations:
//     deprecated.daemonset.template.generation: "1"
//     field.cattle.io/creatorId: user-jsgrs
//   creationTimestamp: "2022-05-16T03:08:58Z"
//   generation: 1
//   labels:
//     cattle.io/creator: norman
//     workload.user.cattle.io/workloadselector: daemonSet-default-asdf`)
//     const btnClick = () => {
//       yamlRef.value.checkYaml(code).then(() => {
//         console.log(11)
//       })
//     }
//     return {
//       code,
//       yamlRef,
//       btnClick
//     }
//   }
// }
</script>

<style scoped></style>

<style scoped>
.el-row {
  background-color: #fafafa;
  height: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.el-divider {
  height: 200px;
}

.captchaImg {
  float: left;
  margin-left: 8px;
  border-radius: 4px;
}
</style>
